/**
 * @format
 * @Author: TC
 * @Date: 2021-09-26 14:17:02
 * @Last Modified by: TC
 * @Last Modified time: 2023-03-18 21:28:35
 */

import { _decorator } from "cc";
import { app } from "../../FrameWork/App";
import { mFrameStorageConst } from "../../FrameWork/Const/FrameStorageConst";
import { BaseAdBtn } from "../Component/BaseAdBtn";
const { ccclass, property } = _decorator;

@ccclass("AdEnery")
export class AdEnery extends BaseAdBtn {
    protected onAdSucc(): void {
        // windowMgr.closeWindowsWithout([this.rootNode.name]);
        app.storageMgr.addNumber(mFrameStorageConst.ENERY, 3);
        app.windowMgr.closeAllWindows();
        app.windowMgr.showTip("获得3点体力");
    }

    protected hide(): void {
        super.hide();
        this.tomorrowTxt.active = true;
    }
}
